// 如果要做异步的，需要从redux里结构applyMiddleware
// 用在createStore的第二个参数里面
import { legacy_createStore as createStore, applyMiddleware } from "redux";
import reducer from "./reducer";
// redux-thunk是redux的一个异步库，作为applyMiddleware的参数
import thunk from "redux-thunk";

const store = createStore(reducer, applyMiddleware(thunk));

export default store;
